<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>首页</title>
<base th:href="@{/}">
<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="static/theme/index.css">
<link rel="stylesheet" href="static/css/myStyle.css"/>
<link rel="stylesheet" href="static/css/reset.css"/>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.js"></script>
</head>
<body>
	<noscript>
		<strong>We're sorry but 首页 doesn't work properly without
			JavaScript enabled. Please enable it to continue.</strong>
	</noscript>

	<div id="app">
		
		<template>
		  <div id="nav-bar1">
		    <el-menu
	      id="nav-bar"
	      :default-active="'/index'"
	      router
	      class="el-menu-demo"
	      mode="horizontal"
	      background-color="white"
	      text-color="#222"
	      active-text-color="#409EFF"
	    >
	      <el-menu-item>
	        <img src="static/img/logo.png" width="100px" />
	      </el-menu-item>
	      <el-menu-item
	        v-for="(item, index) in items2"
	        :key="index"
	        :index="item.index"
	        :id="item.class"
	        >{{ item.title }}</el-menu-item
	      >

	      <el-col id="login-side" :span="4">
	         <!-- Form -->
	      <div>
		    <a
		      id="login"
		      href="javascript:;"
		      @click="dialogForm1Visible = true"
		      class="user-login"
		      v-if="!userisLogin"
		    >
		      <i class="el-icon-user"></i>
		      用户登录
		      </a>
		    <el-button round  @click="dialogForm2Visible = true" v-if="!hrisLogin">HR登录</el-button>
		    <el-dropdown  v-if="userisLogin||hrisLogin" class="user-name" trigger="click">
					                    <span class="el-dropdown-link">
					                        {{id}}
					                        <i class="el-icon-caret-bottom"></i>
					                    </span>
					                      
					                    <el-dropdown-menu slot="dropdown">
					                        <el-dropdown-item divided>
					                        	<el-button type="text" @click="logout">登出</el-button>
					                        	<form hidden th:action="@{/logout}" method="post">
										            <button id="log" type="submit" class="btn btn-default">登出</button>
										        </form>
					                        </el-dropdown-item>
					                    </el-dropdown-menu>
			</el-dropdown>
		    <el-dialog
		      title="用户登录"
		      :visible.sync="dialogForm1Visible"
		      :width="'500px'"
		      show-close
		      center
		    >
		      <form  id="userLogin" th:action="@{/authentication/form}" method="post" style="margin-bottum:30px">
		      
		      <div class="form-group">
			    <label for="inputPassword1" class="col-md-4 control-label">用户名</label>
			    <div class="col-md-8">
			     	  <input name="username" class="form-control" placeholder="用户名">
			    </div>
			  </div>   
		      <div class="form-group">
			    <label for="exampleInputPassword1" class="col-md-4 control-label" style="margin-top:14px">密码</label>
			    <div class="col-md-8" style="margin-top:10px">
			     	<input type="password" class="form-control" name="password" id="exampleInputPassword1" placeholder="密码">
			    </div>
			 
			  </div>
			  
			  <div class="form-group">   	 
		        <el-link :underline="false" href="/usert/register" style="margin-top:10px">没有账号?注册</el-link>
	
		       </div>
		       <div class="form-group">   	 
		        <el-link :underline="false" href="/usert/choose" style="margin-top:10px">忘记密码？</el-link>
	
		       </div>
		         <div class="form-group">   	 
		     
		         <button type="submit" class="btn btn-default">提交</button>
		       </div>
		      </form>
		      </el-dialog>
		      
		      <!-- hr登录 -->
		        <el-dialog
		      title="招聘人登录"
		      :visible.sync="dialogForm2Visible"
		      :width="'500px'"
		      show-close
		      center
		    >
		      <form  id="userLogin" th:action="@{/authentication/form}" method="post" style="margin-bottum:30px">
		      
		      <div class="form-group">
			    <label for="inputPassword1" class="col-md-4 control-label">用户名</label>
			    <div class="col-md-8">
			     	  <input name="username" class="form-control" placeholder="用户名">
			    </div>
			  </div>   
		      <div class="form-group">
			    <label for="exampleInputPassword1" class="col-md-4 control-label" style="margin-top:14px">密码</label>
			    <div class="col-md-8" style="margin-top:10px">
			     	<input type="password" class="form-control" name="password" id="exampleInputPassword1" placeholder="密码">
			    </div>
			 
			  </div>
			  
			  <div class="form-group">   	 
		        <el-link :underline="false" href="/hrt/register" style="margin-top:10px">没有账号?注册</el-link>
	
		       </div>
		         <div class="form-group">   	 
		     
		         <button type="submit" class="btn btn-default">提交</button>
		       </div>
		      </form>
		      </el-dialog>
		      
	      </div>
	   
	  </div>
	      </el-col>
	    </el-menu>
	    
			<el-row>
			    <el-col :span="7">
			      <el-progress
			        id="showLine"
			        :percentage="80"
			        :format="format"
			      ></el-progress>
			    </el-col>
			    <el-col :span="7" id="search-bar1">
			    	<el-col :span="3">
				    	<el-select class="input-with-select"placeholder="请选择" v-model="select">
				          <el-option label="职位" value="职位"></el-option>
				          <el-option label="公司" value="公司"></el-option>
				        </el-select>
			        </el-col>
			        <el-col :span="21">
			        	<el-input
					        placeholder="请输入内容"
					        v-model="input1"
					        class="input-with-select"
					        autosize
					      >
					       
					        <el-button slot="append" @click="search(select,input1)" icon="el-icon-search"></el-button>
					      </el-input>
			        </el-col>
			      
			    </el-col>
		  </el-row>
			
			<el-row>
		      <el-col :span="3" id="side">
		        <el-menu class="el-menu-vertical-demo">
		          <div v-for="(item, index) in items" :key="index">
		            <el-menu-item
		              :index="item.index"
		              @click="isShow(index, item.isSubShow)"
		            >
		              <i :class="item.icon"></i>
		              <span>{{ item.name }}</span>
		              <i :class="item.clickIcon"></i>
		            </el-menu-item>
		            <el-col class="sub1" v-show="item.isSubShow">
		              <el-menu-item-group v-for="(i, ind) in item.subItems" :key="ind">
		                <el-menu-item :index="i.index">
		                
		                	<el-link :underline="false" @click.native="selectJobp(i.name)">{{ i.name }}</el-link>
		                
		                </el-menu-item>
		              </el-menu-item-group>
		            </el-col>
		          </div>
		        </el-menu>
		      </el-col>
		      <el-col :span="5" :offset="4">
		      <el-col :span="12">
		        <el-row
		          :gutter="20"
		          v-for="(item1, index) in showBlock[0]"
		          :key="index"
		          id="block1"
		        >
		          <el-col :span="10">
		            <el-image style="width:70px" :src="item1.cImg" />
		          </el-col>
		          <el-col :span="12">
		            <el-row
		              ><el-link type="info" href="#" :underline="false">{{ item1.cName }}</el-link></el-row
		            ><br />
		            <el-row
		              ><el-link href="#" :underline="false">{{ item1.cType }}</el-link></el-row
		            >
		          </el-col>
		        </el-row>
		      </el-col>
		      <el-col :span="12">
		        <el-row
		          :gutter="20"
		          v-for="(item1, index) in showBlock[1]"
		          :key="index"
		          id="block2"
		        >
		          <el-col :span="10">
		            <el-image style="width:70px" :src="item1.cImg" />
		          </el-col>
		          <el-col :span="12">
		            <el-row
		              ><el-link href="#" :underline="false">{{ item1.cName }}</el-link></el-row
		            ><br />
		            <el-row
		              ><el-link href="#" :underline="false">{{ item1.cType }}</el-link></el-row
		            >
		          </el-col>
		        </el-row>
		      </el-col>
		    </el-col>
		      <el-col :span="11" :offset="1" id="carousel">
		    <el-carousel>
		      <el-carousel-item v-for="(item, index) in lists" :key="index">
		        <img width="100%" :src="item.imgPath" alt="" />
		      </el-carousel-item>
		    </el-carousel>
		  </el-col>
		    </el-row>
			<el-row id="blockArea1">
		    <el-col
		      :span="2"
		      v-for="(o, index) in logoList"
		      :key="index"
		      :offset="index === 0 ? 4 : 0"
		    >
		      <el-card
		        :style="{ width: '80px' }"
		        :body-style="{ padding: '0px', width: '80px', height: '80px' }"
		      >
		        <a href="#">
		          <img
		            :src="o.path"
		            width="100%"
		            height="100%"
		            @mouseover="hoverF(o.hoverShow, index)"
		            @mouseout="hoverF(o.hoverShow, index)"
		          />
		        </a>
		      </el-card>
		      <div class="top" v-show="o.hoverShow">{{ o.text }}</div>
		    </el-col>
		    <el-row id="blockArea2">
		      <el-col
		        :offset="index === 0 ? 4 : 1"
		        v-for="(item, index) in blockList"
		        :key="index"
		        :style="{
		          backgroundImage: 'url(' + item.background + ')',
		          backgroundSize: '100% 100%'
		        }"
		        class="block2"
		      >
		        <span
		          :style="{
		            backgroundImage: 'url(' + item.icon1 + ')',
		            backgroundSize: '100% 100%'
		          }"
		          class="span1"
		        ></span>
		        <span>{{ item.text }}</span>
		      </el-col>
		    </el-row>
		  </el-row>
			<el-row>
		    <el-col :span="17" :offset="4" class="jobList1">
		      <el-tabs type="border-card" @tab-click="tabHandler" v-model="activeName" class="outerCard">
		        <el-tab-pane label="热门职位"  :name="'first'">
		        	
		        	<div class="infinite-list-wrapper" style="overflow:auto">
				    <ul
				      class="list"
				      v-infinite-scroll="load"
				      infinite-scroll-disabled="disabled">
				      <li class="list-item">
				     	<el-col v-model="jobList"  :span="7" :offset="1" v-for="(o,index) in jobList" :key="index" :class="index%3===0?'col-marginTop':'jobList2 col-marginTop'">
				        	<el-card class="box-card" shadow="hover">
							  <el-row>
							  		<el-col :span="10">
								    <el-link id="job-title" :underline="false" @click.native="getJobDetails(o.jid)">
								    	{{ o.jobname }}
								    </el-link>
								    </el-col>
								    <el-col :span="7" :offset="6">
								       <span class="salary">{{ o.jsalary }}</span>
								    </el-col>
							  </el-row>
							  <el-row class="row2">
							  	<el-col class="welfare" :offset="index===0?0:1" :span="5" v-for="(w,index) in o.welfare" :key="index">
							  		<span v-if="index<3">{{ w }}</span>
							  	</el-col>
							  </el-row>
							  <el-row>
							  	<el-col :span="5" class="location">
							  		<i class="el-icon-location-outline"></i>
							  		<span>{{ o.bcity }}</span>
							  	</el-col>
							  	<el-col :span="6" class="location" :offset="1">
							  		<i class="el-icon-timer" v-show="o.jtime[0]!==''"></i>
							  		<span>{{ o.jtime[0] }}</span>
							  	</el-col>
							  	<el-col :span="7" :offset="1" class="location"  v-show="o.jtime.length>1">
							  		<i class="el-icon-date"></i>
							  		<span>{{ o.jtime[1] }}</span>
							  	</el-col>
							  </el-row>
							  <el-divider class="divider"></el-divider>
							  <el-row >
								  <el-col :span="5">
								  	<el-image :src="o.bimg" lazy></el-image>
								  </el-col>
								  <el-col :span="7" :offset="1">
								  	<el-link :underline="false" class="location" @click.native="getBussiness(o.bname)">{{ o.bname }}</el-link>
								  	<el-row class="row2">
								  		<span class="location">发布时间：</span>
								  	</el-row>
								  </el-col>
								  <el-col :span="10" >
								    <el-row>
								  		<el-link :underline="false" class="location">{{ '招聘人数' +o.jnumber }}</el-link>
								    </el-row>
								    <el-row class="row2">
								    	<span class="location">{{ o.jptime }}</span>
								    </el-row>
								  </el-col>
							  </el-row>
							  
							 
							</el-card>
						</el-col>
						</li>
				    </ul>
				    <p v-if="loading">加载中...</p>
				    <p v-if="noMore">没有更多了</p>
				  </div>
		        	

				
		
		        </el-tab-pane>
		        <el-tab-pane label="最新职位" :name="'seconed'">
		        	<el-col  :span="7" :offset="1" v-for="(o,index) in jobListBytime" :key="index" :class="index%3===0?'col-marginTop':'jobList2 col-marginTop'">
				        <el-card class="box-card" shadow="hover">
							  <el-row>
							  		<el-col :span="10">
								    <el-link id="job-title" :underline="false" @click.native="getJobDetails(o.jid)">
								    	{{ o.jobname }}
								    </el-link>
								    </el-col>
								    <el-col :span="7" :offset="6">
								       <span class="salary">{{ o.jsalary }}</span>
								    </el-col>
							  </el-row>
							  <el-row class="row2">
							  	<el-col class="welfare" :offset="index===0?0:1" :span="5" v-for="(w,index) in o.welfare" :key="index">
							  		<span v-if="index<3">{{ w }}</span>
							  	</el-col>
							  </el-row>
							  <el-row>
							  	<el-col :span="5" class="location">
							  		<i class="el-icon-location-outline"></i>
							  		<span>{{ o.bcity }}</span>
							  	</el-col>
							  	<el-col :span="6" class="location" :offset="1">
							  		<i class="el-icon-timer" v-show="o.jtime[0]!==''"></i>
							  		<span>{{ o.jtime[0] }}</span>
							  	</el-col>
							  	<el-col :span="7" :offset="1" class="location"  v-show="o.jtime.length>1">
							  		<i class="el-icon-date"></i>
							  		<span>{{ o.jtime[1] }}</span>
							  	</el-col>
							  </el-row>
							  <el-divider class="divider"></el-divider>
							  <el-row >
								  <el-col :span="5">
								  	<el-image :src="o.bimg" lazy></el-image>
								  </el-col>
								  <el-col :span="7" :offset="1">
								  	<el-link :underline="false" class="location" @click.native="getBussiness(o.bname)">{{ o.bname }}</el-link>
								  	<el-row class="row2">
								  		<span class="location">发布时间：</span>
								  	</el-row>
								  </el-col>
								  <el-col :span="10" >
								    <el-row>
								  		<el-link :underline="false" class="location">{{ '招聘人数' +o.jnumber }}</el-link>
								    </el-row>
								    <el-row class="row2">
								    	<span class="location">{{ o.jptime }}</span>
								    </el-row>
								  </el-col>
							  </el-row>
							  
							 
							</el-card>	
					</el-col>
		          
		        </el-tab-pane>

		      </el-tabs>
		    </el-col>
		  </el-row>
		  </div>
		  <footer></footer>
		</template>
	</div>
	<script src="https://cdn.bootcss.com/qs/6.7.0/qs.min.js"></script>
	<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
	
	<script src="static/js/main.js"></script>

</body>
</html>